Skip to content

fix #139#140

Merged
mfherbst merged 2 commits into
JuliaMolSim:masterfrom
tjjarvinen:fix_isequal
Sep 25, 2025
Merged

fix #139#140
mfherbst merged 2 commits into
JuliaMolSim:masterfrom
tjjarvinen:fix_isequal

Conversation

@tjjarvinen
Copy link
Copy Markdown
Collaborator

The issue had a little more complicated that what it looked like. There was another bug that triggered when when trying direct fix.

So. this fixes the original issue

julia> ChemicalSpecies(:Si) == :Si
true

julia> :Si == ChemicalSpecies(:Si) # now fixed
true

and the other issue that was

julia> ChemicalSpecies(:H) == :not_atom
ArgumentError

and now is

julia> ChemicalSpecies(:H) == :not_atom
false

For the record the latter was triggered by

tmp = ChemicalSpecies(:C12; atom_name=:MyC)
@test atom_name(tmp) != atomic_symbol(tmp)

which raised an error for ChemicalSpecies(:MyC).

Because this is a bigger fix this needs some reviews too.

Comment thread src/utils/chemspecies.jl Outdated
@mfherbst
Copy link
Copy Markdown
Member

Thanks !

@mfherbst mfherbst merged commit f51f936 into JuliaMolSim:master Sep 25, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants